package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardReservefailRequest struct {
	/*
	   核销单外部id     */
	IdentifyTaskId *int64 `json:"identify_task_id,omitempty" required:"false" `
	/*
	   下次联系时间     */
	GmtNextContact *util.LocalTime `json:"gmt_next_contact,omitempty" required:"false" `
	/*
	   预约失败原因码     */
	FailCode *int64 `json:"fail_code" required:"true" `
	/*
	   预约失败原因描述     */
	FailDesc *string `json:"fail_desc,omitempty" required:"false" `
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardReservefailRequest) SetIdentifyTaskId(v int64) *TmallServicecenterWorkcardReservefailRequest {
	s.IdentifyTaskId = &v
	return s
}
func (s *TmallServicecenterWorkcardReservefailRequest) SetGmtNextContact(v util.LocalTime) *TmallServicecenterWorkcardReservefailRequest {
	s.GmtNextContact = &v
	return s
}
func (s *TmallServicecenterWorkcardReservefailRequest) SetFailCode(v int64) *TmallServicecenterWorkcardReservefailRequest {
	s.FailCode = &v
	return s
}
func (s *TmallServicecenterWorkcardReservefailRequest) SetFailDesc(v string) *TmallServicecenterWorkcardReservefailRequest {
	s.FailDesc = &v
	return s
}
func (s *TmallServicecenterWorkcardReservefailRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardReservefailRequest {
	s.WorkcardId = &v
	return s
}

func (req *TmallServicecenterWorkcardReservefailRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.IdentifyTaskId != nil {
		paramMap["identify_task_id"] = *req.IdentifyTaskId
	}
	if req.GmtNextContact != nil {
		paramMap["gmt_next_contact"] = *req.GmtNextContact
	}
	if req.FailCode != nil {
		paramMap["fail_code"] = *req.FailCode
	}
	if req.FailDesc != nil {
		paramMap["fail_desc"] = *req.FailDesc
	}
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardReservefailRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
